Enhancing the Understandability of OCL Specifications
نویسندگان
چکیده
OCL (Object Constraint Language) is the OMG standard language for the precise specification of constraints associated to MOF-compliant models and meta-models. Although OCL has been created with the intention to be a simpler language when compared to traditional formal specification languages, it is common to find specifications containing OCL constraints that are difficult to understand and evolve. This paper presents a set of potential problematic constructions often found in specifications written in OCL and a set of refactorings that can be applied to remove them. We also present an experimental study that has been performed to evaluate the effects of applying those strategies on the understandability of OCL specifications.
منابع مشابه
Measuring OCL expressions: a “tracing”-based approach
Owing that class diagrams constitute the backbone of object-oriented (OO) software development, many metrics were proposed to measure internal quality attributes such as the structural complexity, coupling, size, etc. But none of the proposed metrics take into account the added complexity when class diagrams are complemented by Object Constraint Language (OCL) expressions. OCL expressions impro...
متن کاملAvoiding OCL specification pitfalls
This paper discusses about teaching software modeling by using OCL specifications, in the context in which the web represents the main source of information. The raise of the interest for models induced a higher need for clear and complete specifications. In case of models specified by means of MOF-based languages, adding OCL constraints proved to be an interesting answer to this need. Several ...
متن کاملSemantics of OCL Operation Specifications
The semantics of OCL operation specifications is discussed from a model theoretic perspective. It is argued that the semantics of operation specifications as defined in the OCL 2.0 proposal is not compatible with the view of operation specifications as contracts between a client and a supplier. As a solution, a semantics of OCL operation specifications based on standard model theory is presente...
متن کاملEnhancing the Object Constraint Language for More Expressive Specifications
The Object Constraint Language (OCL) is a precise language which could be used for describing constraints on object-oriented models and other modelling artifacts. The kind of constraints which can be described using OCL include invariants on classes, types and interfaces, preconditions and postconditions of operations and methods. This paper describes some enhancements to OCL that make specific...
متن کاملAn OCL-based Bridge from Concrete to Abstract Syntax
The problem of converting human readable programming languages into executable machine representations is an old one. EBNF and Attribute grammars provide solutions, but unfortunately they have failed to contribute effectively to model-based Object Management Group (OMG) specifications. Consequently the OCL and QVT specifications provide examples of specifications with significant errors and omi...
متن کامل